<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  <title>Document</title>
</head>
<body>
  <div id="app">
    <div class="box" @click="handleBox">
      <h2 @click.right="handleH2">{{message}}</h2>
    </div>

    <input type="text" name="" id="" v-model.lazy="val">

    <input type="text" name="" id="" v-model.trim="val">
    <br/>
    <input type="text" name="" id="" v-model.number="val">
    <p>{{val}}</p>

  </div>

  <script>
    const { createApp, ref } = Vue
  
    createApp({
      setup() {
        const val = ref('')
        const message = ref('Hello vue!')
        const handleH2 = () => {
          console.log('h2 clicked', typeof val.value);
        }
        const handleBox = () => {
          console.log('box clicked');
        }


        

        return {
          message,
          handleH2,
          handleBox,
          val
        }
      }
    }).mount('#app')
  </script>
</body>
</html>